home *** CD-ROM | disk | FTP | other *** search
Text File | 2000-05-02 | 1.2 KB | 43 lines | [TEXT/R*ch] |
- # Lines with '#' are comments that are not executed
-
- # This file contains an example of how to add additional functionality to Snak.
- # This example shows how to periodically send a message to a the channel.
-
- # To automatically load this into a connection, add "/load repeatingmessage" to the startup actions
-
- # The repeating message can be turned on and off
-
- # This flag turns the message on and off
- assign do_repeatingmessage_flag Y
-
-
- # This is the alias that is run every 5 seconds as long as the flag is on.
- # It outputs a message "hello" and then starts a timer that 5 seconds later will
- # run the alias again.
-
- # The "echo hello" only displays the text locally. This lets you experiment
- # without annoying other people in the channel.
-
- # When you are ready, replace the "echo" with "say" to really send the text to the channel.
-
- alias repeatingmessage {
-
- if ([$do_repeatingmessage_flag] == [Y]) {
- echo hello
- timer 5 repeatingmessage
- }
- }
-
- # These aliases start and stop the repeating message by setting the flag to Y or N
- # The ^ in front of the assign makes it "silent"
-
- alias StartRepeatingMessage {
- ^assign do_repeatingmessage_flag Y
- repeatingmessage
- }
-
-
- alias StopRepeatingMessage {
- ^assign do_repeatingmessage_flag N
- }
-